{include file=$header_start}
{if $smarty.get.pid}
    {strip}
    <script src="{$siteroot}/includes/js/admin/addjobtype.js" type="text/javascript"></script>
    {/strip}
{else}
	{strip}
	<script src="{$siteroot}/includes/js/admin/addtrade_cat.js" type="text/javascript"></script>
    {/strip}
{/if}  
{include file=$header_end}

 <div class="contain">
 
      {include file=$left_menu}
      
      <div class="right_contain">
        
         <div class="heading_box">{if $smarty.get.pid}Edit Job Type for "{$parentArray.trade_category|ucfirst}"{else}Edit Trade Category{/if}</div>
         <div class="whitebox">
         <!--Message Div Start-->
         {if $msg}
         <div class="masg_div">
           {$msg}
         </div>
         {/if}
         <!--Message Div End-->
         
         <form name="frmFaq" id="frmFaq" action="" method="post">
         <input type="hidden" id="page" name="page" value="{$page}" />
         <div style="min-height:250px;">
          <!--Form Contain start-->
           
           <div class="form_fieldbox">
             <dl>
              <dt>{if $smarty.get.pid}Job Type {else}Cateogry Name{/if}:</dt>
              <dd><input type="text" class="input" name="cat_name" id="cat_name" value="{$tradecatArray.trade_category}"/></dd>
              <div class="clear"></div>
              {if $is_subcat}
                  <dt>Price:</dt>
                  <dd><input type="text" class="input" name="cat_price" id="cat_price" value="{$tradecatArray.price}"/></dd>
                  <div class="clear"></div>
                  
                  <dt>Expired Time:</dt>
                  <dd>
                      <select name="cat_expired_time" id="cat_expired_time" class="banner_inputbx trade">
                        {section name=i loop=$expired_time}
                        	<option value="{$smarty.section.i.index}" {if $smarty.section.i.index eq $tradecatArray.expired_time} selected="selected" {/if}>{$expired_time[i]}</option>
                        {/section} (Months)
                     </select>
                  </dd>
                  <div class="clear"></div>                  
              {/if}
             </dl>
             <div class="clear"></div>
              <dl>
              <dt>Description: <span class="error">*</span></dt>
              <dd>{php}
             	include_once(INCLUDE_FCKEDITOR);
                
                $tradeObj = new Model_TRADE();
                $id= base64_decode($_GET['id']); 
				$catArray=$tradeObj->new_getTradeCategoryDetailsById($id);

                
                $sBasePath 			= 	$_SERVER[ 'PHP_SELF' ] ;
                $sBasePath			=	FCKEDITOR_BASEPATH;
                $oFCKeditor 		= 	new FCKeditor('description');
                $oFCKeditor->BasePath 	= 	$sBasePath;
                $oFCKeditor->Height = '500' ;
                $oFCKeditor->Width = '650' ;
                $oFCKeditor->Value	=	$catArray['description'];						
                $oFCKeditor->Create();
              {/php}
              </dd>
              <div class="clear"></div>
             </dl>
            
              <div class="clear"></div>
             </dl>
            </div>
            
            <!--Form Contain end--> 
          
           <!--Button here start-->
           <div>
            <span><input type="submit" class="admin_btn" value="Submit" name="edittrade_btn" id="edittrade_btn" /></span>
            <span><input type="button" class="admin_btn" value="Cancel" {if $smarty.get.pid} onclick="window.location='{$siteroot}/admin/home.php?q=tradecategories&pid={$smarty.get.pid}&page={$smarty.get.page}';" {else} onclick="window.location='{$siteroot}/admin/home.php?q=tradecategories&page={$smarty.get.page}';" {/if} /></span>
           </div>
            <!--Button here end-->
  
         </div>
         </form>
         
         </div>
        </div>
      
      
      <!--right_contain end-->
      <div class="clear"></div>
    </div>
    
{include file=$footer}